/**
 * 时间增加
 */
var d = new Date();
$("#one_day").val((d.getMonth()+1)+"月"+(d.getDate()+1)+"日");
$("#two_day").val((d.getMonth()+1)+"月"+(d.getDate()+2)+"日");
$("#three_day").val((d.getMonth()+1)+"月"+(d.getDate()+3)+"日");
$("#four_day").val((d.getMonth()+1)+"月"+(d.getDate()+4)+"日");
$("#five_day").val((d.getMonth()+1)+"月"+(d.getDate()+5)+"日");
$("#six_day").val((d.getMonth()+1)+"月"+(d.getDate()+6)+"日");
$("#seven_day").val((d.getMonth()+1)+"月"+(d.getDate()+7)+"日");
$("#eight_day").val((d.getMonth()+1)+"月"+(d.getDate()+8)+"日");
$("#nine_day").val((d.getMonth()+1)+"月"+(d.getDate()+9)+"日");
$("#ten_day").val((d.getMonth()+1)+"月"+(d.getDate()+10)+"日");




/*
http://www.amazon.com/rain+poncho/dp/B016NTIZEY/ref=sr_1_1?ie=UTF8&qid=1448934741&sr=8-1&keywords=rain+pincho
http://www.amazon.com/啊+c+d+d+d+s+ff+s+f+d/dp/13123/ref=sr_1_1?ie=UTF8&qid=1448934741&sr=8-1&keywords啊+c+d+d+d+s+ff+s+f+d

超级链接生成公式

http://www.amazon.com/-----》固定的
rain+poncho/----》客户填写的核心关键词，中间用+号隔开
dp/B016NTIZEY/----》固定的，后面的以B开头的号码就是客户填写的ASIN
ref=sr_1_1?ie=UTF8&qid=1448934741&sr=8-1&----》固定的
keywords=rain+pincho-----》等号后面的和第二行是一样的
*/

var website = "http://www.amazon.com/";
var  v0 = "dp/";
var  v1 = "ref=sr_1_1?ie=UTF8&qid=1448934741&sr=8-1&keywords=";
$(function(){
	$("#btnLink").click(function(){
		var asin = $("input[name='asin']");
		var key = $("input[name='pro_key']");
		var key_value;
		var regExp = /\s+/g;
		if(key.val()!=""){
			key_value = key.val().trim().replace(regExp,"+");
		}
		
		var pro_url = $("input[name='pro_url']");
		pro_url.val(website+key_value+"/"+v0+asin.val()+"/"+v1+key_value);
	});
	$("#ybtnLink").click(function(){
		var asin = $("input[name='yasin']");
		var key = $("input[name='ypro_key']");
		var key_value;
		var regExp = /\s+/g;
		if(key.val()!=""){
			key_value = key.val().trim().replace(regExp,"+");
		}
		
		var pro_url = $("input[name='ypro_url']");
		pro_url.val(website+key_value+"/"+v0+asin.val()+"/"+v1+key_value);
	});
	
	$("#one_day").focus(function(){
		var c = "2016/"+$("#one_day").val().replace("月","/").replace("日","");
		var d = new Date(c);
		var two = d.getDate()+1;
		//alert(two);
		//$("#two_day").val((d.getMonth()+1)+"月"+(d.getDate()+2)+"日");
		
		
	});
});